<?php

namespace App\Http\Repository;

use App\Version;

class VersionRepository
{
    private $version;

    public function __construct(Version $version)
    {
        $this->version = $version;
    }

    public function getVersions()
    {
        return $this->version
            ->orderBy('id', 'DESC')
            ->get();
    }

    public function getNewVersion()
    {
        return $this->version
            ->orderBy('id', 'DESC')
            ->value('version');
    }

}